<html>
jijiji
<script src="https://unpkg.com/axios/dist/axios.min.js"></script>

<script>
//axios.defaults.headers.post['Content-Type'] = 'application/x-www-form-urlencoded';
//axios.defaults.headers['Access-Control-Request-Method'] = 'post';

const request = axios.create({
  baseURL: 'https://brpool.ru/',
 // timeout: 5000,
 // headers: {'access-control-request-method':'post'}
});

//request({'url':'/public/v1/login', 'data':{'username':'aaa','password':'ff'}, 'method':'post'})
request.post('/public/v1/login/', {'username':'pm250','password':'admin14753749'})
 .catch(function (error) {
    if (error.response) {
      // The request was made and the server responded with a status code
      // that falls out of the range of 2xx
      console.log(error.response.data);
      console.log(error.response.status);
      console.log(error.response.headers);
    } else if (error.request) {
      // The request was made but no response was received
      // `error.request` is an instance of XMLHttpRequest in the browser and an instance of
      // http.ClientRequest in node.js
      console.log(error.request);
    } else {
      // Something happened in setting up the request that triggered an Error
      console.log('Error', error.message);
    }
    console.log(error.config);
  });
/*
  .then(function(response) {
    console.log(response.data);
    console.log(response.status);
    console.log(response.statusText);
    console.log(response.headers);
    console.log(response.config);
  });
*/
</script>
</html>